<?php

	global $HTTP_GET_VARS;
	global $HTTP_POST_VARS;
	global $account;
	global $account_state;
	global $error;
	global $sql_row, $sql, $sql_total;

	$register_slot = sql("SELECT product FROM `distribution_register` GROUP BY product DESC");
	
	$keys			=	makedefaultkeywords();	
	dopage('Upload_StartRows',$keys);
	

	$keys			=	makedefaultkeywords();			
	$keys			=	makekeywords('newrow','',$keys);			
	//$keys			=	makekeywords('endrow','',$keys);			
	//$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"View your Statistics!",$keys);
	$keys			=	makekeywords('desc',"Maxsi Distribution tracks your progress through the games we distribute, simply enter your Steam Username and learn much more!",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=stats',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1643),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	//$keys			=	makekeywords('newrow','',$keys);			
	$keys			=	makekeywords('endrow','',$keys);			
	$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"Get the Games!",$keys);
	$keys			=	makekeywords('desc',"Simply download our light-weight installer and you'll be streaming the games onto your harddisk in no time!",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=showgames',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1644),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	$keys			=	makekeywords('newrow','',$keys);			
	//$keys			=	makekeywords('endrow','',$keys);			
	//$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"Errors? Bugs?",$keys);
	$keys			=	makekeywords('desc',"We'd love to help you get stuff working, if you got any errors, simply visit our support site and we'll do everything we can to make everything work.",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'support/',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1645),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	//$keys			=	makekeywords('newrow','',$keys);			
	$keys			=	makekeywords('endrow','',$keys);			
	$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"Take the Tour",$keys);
	$keys			=	makekeywords('desc',"Want to know more about how the Maxsi Distribution technology streams down the game content to your computer, how your stats help everyone in the longer run, how the games are always up-to-date when you run them?",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=tour',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1646),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	$keys			=	makekeywords('newrow','',$keys);			
	//$keys			=	makekeywords('endrow','',$keys);			
	//$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"Getting Distributed",$keys);
	$keys			=	makekeywords('desc',"We believe the community would benefit most from free access to our technologies, we'd gladly help you distribute your works free of charge.",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=joining',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1647),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	//$keys			=	makekeywords('newrow','',$keys);			
	$keys			=	makekeywords('endrow','',$keys);			
	$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"We care about your privacy!",$keys);
	$keys			=	makekeywords('desc',"All data submited by our products are anonymously available to everyone. We only recieve your UserId and gameplay stats. Nothing else. Every bit of information regarding you, is available to you.",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=privacy',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1648),$keys);
	dopage('distribution_row',$keys);
	
	
	$keys			=	makedefaultkeywords();			
	$keys			=	makekeywords('newrow','',$keys);			
	$keys			=	makekeywords('endrow','',$keys);			
	//$keys			=	makekeywords('mirror','',$keys);			
	$keys			=	makekeywords('name',"Legal Stuff",$keys);
	$keys			=	makekeywords('desc',"Unsure about any legal question? Simply read our license and get some answers.",$keys);
	$keys			=	makekeywords('url',ROOT . ROOT2ROOT . 'distribution/?action=legal',$keys);					
	$keys			=	makekeywords('thumburl_100px',uploadid(1649),$keys);
	dopage('distribution_row',$keys);
	
	// Most downloaded!
	
	$recent_from_index	=	true;
	include("showgames.php");
	
	$keys			=	makedefaultkeywords();		
	dopage('Upload_EndRows',$keys);

	// Recent acitivity
	
	// Do the actual output
			
	output( '<p><b class="text_big">Number of downloads</b><br />
	Our systems track how many users have installed our products and when. This is a good indication of how busy our servers are.<br /><br />');
		
	if ( $account_state == 1 && $account['admin'] == 1)
	{
		$leftstr	=	'<a href="?action=showusers">';
		$rightstr	=	'</a>';				
	}
	else
	{
		$leftstr	=	'';
		$rightstr	=	'';
	}
			
	output($leftstr . '<img src="?action=statgraph&graph=showdownloads" alt="Stats for Maxsi Distribution" style="border: 0px;" />' . $rightstr . '</p><br /><br />');
	
	// Show the news!
	
	drawblog("Maxsi Distribution",5,0,1,true);

?>